workspace 'GKPhotoBrowserDemo.xcworkspace'

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '10.0'

# 去掉烦人的警告
inhibit_all_warnings!

target 'GKPhotoBrowserDemo' do
  use_frameworks!
  
  pod 'AFNetworking'
  pod 'SDWebImage'
  pod 'YYWebImage', '~> 1.0.5'
  pod 'GKNavigationBar'
  pod 'YYModel'
  pod 'GKCover'
  pod 'SDAutoLayout'
  pod 'MBProgressHUD'
  pod 'GKMessageTool'
  pod 'Masonry'
  pod 'ZLPhotoBrowser'
  pod 'GKSliderView'
  pod 'MJRefresh'
  
  pod 'GKVideoScrollView'
  
  pod 'GKPhotoBrowser', :path => '../'
  pod 'GKPhotoBrowser/YY', :path => '../'
  pod 'GKPhotoBrowser/KF', :path => '../'
  pod 'GKPhotoBrowser/Alamofire', :path => '../'
  
  pod 'GKPhotoBrowser/SJPlayer', :path => '../'
  pod 'GKPhotoBrowser_Static/ZFPlayer', :path => '../'
#  pod 'GKPhotoBrowser_Static/IJKPlayer', :path => '../'
#  pod 'GKPhotoBrowser', :subspecs => ['SD', 'YY', 'AVPlayer'], :path => '../'
#  pod 'GKPhotoBrowser/SD', :path => '../'
#  pod 'GKPhotoBrowser/AVPlayer', :path => '../'
#  pod 'GKPhotoBrowser/Progress', :path => '../'

end

post_install do |installer|
  installer.pods_project.targets.each do |t|
    t.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      config.build_settings["SWIFT_OPTIMIZATION_LEVEL"] = "-Onone"
      xcconfig_path = config.base_configuration_reference.real_path
      xcconfig = File.read(xcconfig_path)
      xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
      File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
    end
  end
  
  # 移除MobileCorServices弃用警告
  MCSFramework = installer.pods_project.frameworks_group["iOS"]["MobileCoreServices.framework"]
  MCSFramework.referrers.each do |ref|
    if ref.isa == "PBXBuildFile"
      ref.remove_from_project
    end
  end
  MCSFramework.remove_from_project
  
  # 移除AssetsLibrary弃用警告
  ALFramework = installer.pods_project.frameworks_group["iOS"]["AssetsLibrary.framework"]
  ALFramework.referrers.each do |ref|
    if ref.isa == "PBXBuildFile"
      ref.remove_from_project
    end
  end
  ALFramework.remove_from_project
end
